load("//bazel:mongo_src_rules.bzl", "idl_generator", "mongo_cc_library")

package(default_visibility = ["//visibility:public"])

exports_files(
    glob([
        "*.h",
        "*.cpp",
    ]),
)

idl_generator(
    name = "abort_reshard_collection_gen",
    src = "abort_reshard_collection.idl",
    deps = [
        "//src/mongo/db:basic_types_gen",
        "//src/mongo/idl:generic_argument_gen",
        "//src/mongo/s/resharding:common_types_gen",
    ],
)

idl_generator(
    name = "auto_split_vector_gen",
    src = "auto_split_vector.idl",
    deps = [
        "//src/mongo/db:basic_types_gen",
        "//src/mongo/idl:generic_argument_gen",
    ],
)

idl_generator(
    name = "balancer_collection_status_gen",
    src = "balancer_collection_status.idl",
    deps = [
        "//src/mongo/db:basic_types_gen",
        "//src/mongo/idl:generic_argument_gen",
    ],
)

idl_generator(
    name = "cleanup_reshard_collection_gen",
    src = "cleanup_reshard_collection.idl",
    deps = [
        "//src/mongo/db:basic_types_gen",
        "//src/mongo/idl:generic_argument_gen",
    ],
)

idl_generator(
    name = "cleanup_orphaned_gen",
    src = "cleanup_orphaned.idl",
    deps = [
        "//src/mongo/db:basic_types_gen",
        "//src/mongo/idl:generic_argument_gen",
    ],
)

idl_generator(
    name = "cluster_commands_without_shard_key_gen",
    src = "cluster_commands_without_shard_key.idl",
    deps = [
        "//src/mongo/db:basic_types_gen",
        "//src/mongo/db/sharding_environment:sharding_types_gen",
        "//src/mongo/idl:generic_argument_gen",
    ],
)

idl_generator(
    name = "commit_reshard_collection_gen",
    src = "commit_reshard_collection.idl",
    deps = [
        "//src/mongo/db:basic_types_gen",
        "//src/mongo/idl:generic_argument_gen",
    ],
)

idl_generator(
    name = "configure_collection_balancing_gen",
    src = "configure_collection_balancing.idl",
    deps = [
        "//src/mongo/db:basic_types_gen",
        "//src/mongo/idl:generic_argument_gen",
    ],
)

idl_generator(
    name = "coordinate_multi_update_gen",
    src = "coordinate_multi_update.idl",
    deps = [
        "//src/mongo/db:basic_types_gen",
        "//src/mongo/idl:generic_argument_gen",
    ],
)

idl_generator(
    name = "flush_resharding_state_change_gen",
    src = "flush_resharding_state_change.idl",
    deps = [
        "//src/mongo/db:basic_types_gen",
        "//src/mongo/idl:generic_argument_gen",
    ],
)

idl_generator(
    name = "get_stats_for_balancing_gen",
    src = "get_stats_for_balancing.idl",
    deps = [
        "//src/mongo/db:basic_types_gen",
        "//src/mongo/idl:generic_argument_gen",
    ],
)

idl_generator(
    name = "move_range_request_gen",
    src = "move_range_request.idl",
    deps = [
        "//src/mongo/db:basic_types_gen",
        "//src/mongo/db:write_concern_options_gen",
        "//src/mongo/db/sharding_environment:sharding_types_gen",
        "//src/mongo/idl:generic_argument_gen",
    ],
)

idl_generator(
    name = "reshard_collection_gen",
    src = "reshard_collection.idl",
    deps = [
        "//src/mongo/db:basic_types_gen",
        "//src/mongo/idl:generic_argument_gen",
        "//src/mongo/s/resharding:common_types_gen",
    ],
)

idl_generator(
    name = "resharding_operation_time_gen",
    src = "resharding_operation_time.idl",
    deps = [
        "//src/mongo/db:basic_types_gen",
        "//src/mongo/idl:generic_argument_gen",
    ],
)

idl_generator(
    name = "transition_from_dedicated_config_server_gen",
    src = "transition_from_dedicated_config_server.idl",
    deps = [
        "//src/mongo/db:basic_types_gen",
        "//src/mongo/idl:generic_argument_gen",
    ],
)

idl_generator(
    name = "transition_to_dedicated_config_server_gen",
    src = "transition_to_dedicated_config_server.idl",
    deps = [
        "//src/mongo/db:basic_types_gen",
        "//src/mongo/db/topology:remove_shard_gen",
        "//src/mongo/idl:generic_argument_gen",
    ],
)

idl_generator(
    name = "wait_for_fail_point_gen",
    src = "wait_for_fail_point.idl",
    deps = [
        "//src/mongo/db:basic_types_gen",
        "//src/mongo/idl:generic_argument_gen",
    ],
)

idl_generator(
    name = "update_zone_key_range_gen",
    src = "update_zone_key_range.idl",
    deps = [
        "//src/mongo/db:basic_types_gen",
        "//src/mongo/idl:generic_argument_gen",
    ],
)
